package cc.wfu.types.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class Constants {

    public final static String LOGIN_CODE_TITLE = "登录验证码";

    @AllArgsConstructor
    @NoArgsConstructor
    @Getter
    public enum ResponseCode {
        SUCCESS("0000", "操作成功"),
        ERROR("0001", "操作失败"),
        UN_ERROR("0002", "未知失败"),
        ILLEGAL_PARAMETER("0003", "非法参数"),
        APP_ERROR("0004", "内部防攻击错误"),
        TOKEN_ERROR("Unauthorized-401-0003", "权限拦截"),
        ORDER_PRODUCT_ERR("OE001", "所购商品已下线，请重新选择下单商品"),
        ;

        private String code;
        private String info;

    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Getter
    public enum ResponseError {

        USERNAME_NOT_FOUND("用户不存在！"),

        DEFAULT_ERROR("服务器异常"),
        DEFAULT_SUCCESS("操作成功"),
        ILLEGAL_CODE_ERROR("验证码错误"),
        USER_REGISTER_ERROR("注册失败，请重试"),
        ILLEGAL_USER_EMAIL_ERROR("该邮箱账号不存在或已被冻结!"),
        ILLEGAL_USER_PASSWORD_ERROR("用户密码错误!"),
        GEN_JWT_TOKEN_ERROR("jwtToken生成失败!"),
        VERIFY_JWT_TOKEN_ERROR("jwtToken解析失败!"),
        UPDATE_USER_PASSWORD_ERROR("密码修改失败!"),
        ;

        private String info;

    }

}
